import 'package:flutter_enjoy_plus/constants/index.dart';
import 'package:flutter_enjoy_plus/utils/RequestDio.dart';

// 获取验证码
Future getCodeAPI(params) => requestDio.get(HTTP_PATH.GET_CODE, params: params);

// 登录/注册
Future loginAPI(data) => requestDio.post(HTTP_PATH.LOGIN, data: data);

// 获取用户信息
Future getUserInfoAPI() => requestDio.get(HTTP_PATH.GET_USER_INFO);

// 更新用户昵称
Future updateUserInfoAPI(data) => requestDio.put(HTTP_PATH.GET_USER_INFO, data: data);

// 上传图片或头像
Future uploadImageAPI(data) => requestDio.upload(HTTP_PATH.UPLOAD_IMAGE, data: data);